package xyz.zhouxf.rpc.exception;

import xyz.zhouxf.rpc.enumeration.RpcError;

/**
 * @author zhouxf
 * @date 2022/8/20
 */
public class RpcException extends RuntimeException {
    public RpcException(RpcError errorCode, String detail) {
        super(errorCode.getMessage() + ": " + detail);
    }

    public RpcException(RpcError errorCode) {
        super(errorCode.getMessage());
    }
}
